package com.knowif.enumInfo;


/**
 * @author xingyao
 * @Description: 操作枚举
 */
public enum OperationEnum {

	PAY("支付"),
	
	RETURN("退款");
	
	private String operation;

	private OperationEnum(String operation) {
		this.operation = operation;
	}
	public String getOperation() {
		return operation;
	}

	public void setOperation(String operation) {
		this.operation = operation;
	}
	
	
	/**
	 * @author: xingyao 
	 * @Description:  判断是否是支付操作
	 * @param operation
	 * @return
	 */
	public static boolean isPay(String operation){
		if(PAY.getOperation().equals(operation)){
			return true;
		}else{
			return false;
		}
	}
	
	
	/**
	 * @author: xingyao 
	 * @Description:  判断是否是退款操作
	 * @param operation
	 * @return
	 */
	public static boolean isReturn(String operation){
		if(RETURN.getOperation().equals(operation)){
			return true;
		}else{
			return false;
		}
	}
}




